package com.mepo.cheer.client.pages;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.mepo.cheer.shared.Coach;

public class CoachPage extends Composite {

	public CoachPage(Coach c) {
		HorizontalPanel content = new HorizontalPanel();
		content.setSize("100%", "100%");
		
		Image image = new Image(c.getImageLocation());
		image.addStyleName("coach-img");
		content.add(image);
		content.setCellHorizontalAlignment(image, HasHorizontalAlignment.ALIGN_CENTER);
		
		VerticalPanel descPanel = new VerticalPanel();
		descPanel.setWidth("300px");
		
		Label coachName = new Label(c.getName());
		coachName.addStyleName("coach-name");
		descPanel.add(coachName);
		
		HTML bio = new HTML(c.getBio());
		bio.addStyleName("coach-bio");
		descPanel.add(bio);
		
		content.add(descPanel);
		content.setCellHorizontalAlignment(descPanel, (HasHorizontalAlignment.ALIGN_LEFT));
		initWidget(content);
		
	}
}
